package com.wuxiaoqin.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wuxiaoqin.server.entity.Commodity;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2021-10-28
 */
public interface CommodityMapper extends BaseMapper<Commodity> {//查询高销量商品
    @Select("select * from commodity where C_state=0  order by C_salesVolumes DESC limit #{number}")
    List<Commodity> getGoodsBySale(Integer number);

    @Select("select * from commodity WHERE  C_firstClass=#{i}  and C_state=0 order by C_createtime DESC LIMIT #{number};")
    List<Commodity> getHotGood(Integer i,Integer number);
}
